home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00078_Script_AcompanhaScroll2 < prev    next >
Text File  |  1999-03-19  |  896b  |  34 lines

  1. property linha, posicaoMinima, posicaoMaxima
  2. property spr
  3.  
  4. on getBehaviorDescription
  5.   return "Num ponto do scroll aparece sprite"
  6. end
  7.  
  8. on getPropertyDescriptionList
  9.   set p_list = [ ¼
  10.     #posicaoMinima: [ #comment:   "Posicao minima do scroll para aparecer", ¼
  11.                  #format:   #integer, ¼
  12.                  #default:    1000 ],¼
  13.     #posicaoMaxima: [ #comment:   "Posicao maxima do scroll para aparecer", ¼
  14.                  #format:   #integer, ¼
  15.                  #default:    1200 ]¼
  16.   ]
  17.   return p_list
  18. end
  19.  
  20.  
  21. on beginSprite me
  22.   set spr = the spriteNum of me
  23.   set linha = 0
  24.   set the visibility of sprite spr to false
  25. end 
  26.  
  27. on scrollLinha me, linhas
  28.   set linha = linha + linhas
  29.   if linha > posicaoMinima and linha < posicaoMaxima then
  30.     set the visibility of sprite spr to true
  31.   else
  32.     set the visibility of sprite spr to false
  33.   end if
  34. end